<el-form ref="form" :model="form" :rules="rules" label-width="120px">
    <el-row :gutter="10">
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="拜访客户" prop="GWAKL004">
                <el-input v-model="form.GWAKL004" readonly clearable>
                    <i v-show="!disabled" class="el-icon-search el-input__icon" @click="openGwakl004" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="商机主题" prop="GWBGL003">
                <el-input v-model="form.GWBGL003" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwbgl003" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="拜访日期" prop="GWBH003">
                <el-date-picker
                        v-model="form.GWBH003"
                        type="date"
                        value-format="yyyy-MM-dd"
                        style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="负责经销商">
                <el-input v-model="form.GWAKL003" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwakl003" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="商机来源" prop="GWBH001">
                <el-select v-model="form.GWBH001" clearable>
                    <el-option v-for="item in selectOptions.crm_gwat160_gwbh001" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="商机阶段" prop="GWAVL003">
                <el-input v-model="form.GWAVL003" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwavl003" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="维系方式" prop="GWBH034">
                <el-select v-model="form.GWBH034" clearable>
                    <el-option v-for="item in selectOptions.crm_gwat160_gwbh034" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="进入阶段日期" prop="GWBH030">
                <el-date-picker
                        v-model="form.GWBH030"
                        type="date"
                        value-format="yyyy-MM-dd"
                        style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="成交几率" prop="GWBH031">
                <el-select v-model="form.GWBH031" clearable>
                    <el-option v-for="item in selectOptions.crm_gwat160_gwbh031" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16">
            <el-form-item label="拜访目的" prop="GWBH010">
                <el-input v-model="form.GWBH010"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="拜访人员">
                <el-input v-model="form.GWBH006" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwbh006" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="拜访内容">
                <div style="width: 100%;">
                <p v-for="tab in gwbf" style="width: 100%;">
                    {{ tab.GWBFL004 }}
                    <el-input type="textarea" v-model="tab.msg"></el-input>
                </p>
                </div>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="主管回复">
                <el-input type="textarea" v-model="form.GWBH032"> </el-input>
            </el-form-item>
        </el-col>
    </el-row>
    <el-row>
        <el-collapse accordion>
            <el-collapse-item title="后续拜访计划" name="1">
                <el-form label-width="140px" :model="form" :rules="rules">
                    <el-row>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="下次拜访人">
                                <el-input v-model="form.GWBH021"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="职位">
                                <el-input v-model="form.GWBH022"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="角色">
                                <el-input v-model="form.GWBH023"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="拜访开始时间">
                                <el-date-picker
                                        v-model="form.GWBH019"
                                        type="date"
                                        placeholder="请选择拜访开始时间"
                                        value-format="yyyy-MM-dd"
                                        style="width:100%">
                                </el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="拜访结束时间">
                                <el-date-picker
                                        v-model="form.GWBH020"
                                        type="date"
                                        placeholder="请选择拜访结束时间"
                                        value-format="yyyy-MM-dd"
                                        style="width:100%">
                                </el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="拜访目的">
                                <el-input v-model="form.GWBH025"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="拜访地址">
                                <el-input v-model="form.GWBH024"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
                            <el-form-item label="拜访内容">
                                <el-input v-model="form.GWBH026"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
            </el-collapse-item>
        </el-collapse>
    </el-row>
    <el-row style="margin-top: 20px;">
        <el-tabs v-model="activeName2" type="card">
            <el-tab-pane label="商机明细" name="first">
                <div class="pos-ab" style="margin-bottom: 10px;margin-top: 10px;">
                    <el-button type="primary" icon="el-icon-plus" size="small"
                               @click="addGwbk">添加</el-button>
                    <el-button type="primary" icon="el-icon-delete" size="small" class="z-depth-2"
                               @click="del">删除</el-button>
                </div>
                <div class="table-responsive">
                    <table id="gwat160_edit_table1"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="gwat160_edit_table1">
                    </table>
                </div>
            </el-tab-pane>
            <el-tab-pane label="关键评估项" name="second">
                <div class="pos-ab" style="margin-bottom: 10px;margin-top: 10px;">
                    <el-button type="warning" icon="icon iconfont icon-21" size="mini" class="z-depth-2"
                               @click="sureGwbl">保存</el-button>
                </div>
                <div class="table-responsive">
                    <table id="gwat160_edit_table2"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="gwat160_edit_table2">
                    </table>
                </div>
            </el-tab-pane>
            <el-tab-pane label="竞争信息" name="three">
                <div class="pos-ab" style="margin-bottom: 10px;margin-top: 10px;">
                    <el-button type="primary" icon="el-icon-plus" size="small" class="z-depth-2"
                               @click="addGwbj">添加</el-button>
                    <el-button type="primary" icon="el-icon-delete" size="small" class="z-depth-2"
                               @click="delGwbj">删除</el-button>
                </div>
                <div class="table-responsive">
                    <table id="gwat160_edit_table3"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="gwat160_edit_table3">
                    </table>
                </div>
            </el-tab-pane>
        </el-tabs>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancel">关闭</el-button>
            <el-button type="warning" icon="icon iconfont icon-21" size="mini" @click="sure">保存</el-button>
        </el-col>
    </el-row>
</el-form>
<script>
    require(["pc/crm/gwat160_edit"], $.noop);
</script>
